﻿// ***********************************************************************
// Assembly         : Tx.OCC
// Author           : tianteng
// Created          : 06-24-2019
//
// Last Modified By : tianteng
// Last Modified On : 06-24-2019
// ***********************************************************************
// <copyright file="OccConvert.cs" company="北京腾雪科技有限责任公司">
//     Copyright © 北京腾雪科技有限责任公司 2022
// </copyright>
// <summary></summary>
// ***********************************************************************
using Occt;

namespace Tx.OCC
{
    /// <summary>
    /// Class OccConvert.
    /// </summary>
    public static class OccConvert
    {
        /// <summary>
        /// Converts to trsf.
        /// </summary>
        /// <param name="ax2">The ax2.</param>
        /// <returns>gp_Trsf.</returns>
        public static gp_Trsf ToTrsf(this gp_Ax2 ax2)
        {
            return new gp_Trsf(new gp_Ax3(ax2));
        }

        /// <summary>
        /// To the PNT.
        /// </summary>
        /// <param name="vertex">The vertex.</param>
        /// <returns>gp_Pnt.</returns>
        public static gp_Pnt ToPnt(this TopoDS_Vertex vertex)
        {
            return BRep_Tool.Pnt(vertex);
        }
    }
}
